<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8" />
<script type="text/javascript">
chrome.extension.onRequest.addListener(
	function(unused, sender, sendResponse) {
        var provider = null;
        var script = null;
		if (sender.tab.url == "https://nomadisme.clermont-universite.fr:8090/index.asp") {
            script = "providers/auversup.js";
			provider = {provider: 'Auversup', username: localStorage["username"], password: localStorage["password"]};
		}
        
        
        if (script)
            chrome.tabs.executeScript(sender.tab.id, {file: script}, function() { sendResponse(provider); });
        else
            sendResponse(provider);
	}
);
</script>
</head>
<body></body>
</html>